<script src="http://code.jquery.com/jquery-1.5.js"></script>
<?php use_helper('Javascript') ?>
<?php use_helper('Object');?>
<?php use_helper('DateForm') ?>
<div id="update_calendar">
<?php /* @var $calendar Calendar */ ?>
<b><?php echo __('repetition time');?></b></br>
<?php echo __('Begins at:');?></br>
<?php if(!$calendar):?>
<?php $calendar = new Calendar();?>
<?php endif; ?>
<?php echo input_date_tag('calendar[begins]', $calendar?$calendar->getFirstEventStart(): date('Y-m-d')
                        , array ('year_start' => '1900'
                            , 'year_end' => '2099'
                            , 'withtime' => true));?><br/>
<?php echo __('Event repeated every');?>&nbsp;
<?php echo input_tag('calendar[duration]'
					, $calendar?$calendar->getDuration():1
					, array('maxlength' => '4'
					        , 'size' => '4'))?></br>
<?php echo select_tag('calendar[metric]'
                    , options_for_select(Calendar::getTimeMetricList()
                                        , $calendar?($calendar->getDurationMetric()):'y'))?>
<?php echo __('Event repeated');?>&nbsp;
<?php echo input_tag('calendar[times_to_repeat]'
                    , $calendar?$calendar->getTimesToRepeat():1
                    , array('class' => ''
                            , 'maxlength' => '4'
                            , 'size' => '4'))?>&nbsp;<?php echo __('times');?>.</br>

</div>